const menuToggleBtn = document.getElementsByClassName('side-menu-toggle')[0],
      maskEl = document.getElementsByClassName('mask')[0],
      mobileNavEl = document.getElementsByClassName('mobile-nav')[0];

menuToggleBtn.addEventListener('click', menuToggleHandler);
maskEl.addEventListener('click', maskClickHandler);

function menuToggleHandler () {
    mobileNavEl.classList.add('open');
    maskEl.style.display = 'block';
}
function maskClickHandler () {
    mobileNavEl.classList.remove('open');
    maskEl.style.display = 'none';
}
